/**
 * @description: 剧本相关
 * @fileName: index
 * @author: 17076
 * @date: 2025/3/3-下午5:33
 * @version: V1.0.0
 **/
import request from '@/utils/request'
/** 拆分剧本 */
export function splitPlay(data) {
  return request({
    url: `/api/playDescInfo/splitPlay`,
    method: 'post',
    data
  })
}
/** 合并分段 */
export function combinePart(data) {
  return request({
    url: `/api/playPart/mergePart`,
    method: 'post',
    data
  })
}
/** 分割分段 */
export function divisionPart(data) {
  return request({
    url: `/api/playPart/splitPart`,
    method: 'post',
    data
  })
}
/** 删除分段 */
export function deletePart(data) {
  return request({
    url: `/api/playPart/delPart`,
    method: 'post',
    data
  })
}
/** 上传剧本 */
export function uploadPlay(data) {
  return request({
    url: `/api/text/uploadPlay`,
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    data
  })
}
/** 剧本详情 */
export function selectDetail(data) {
  return request({
    url: `/api/playDescInfo/selectDetail`,
    method: 'post',
    data
  })
}
/** 查询剧本内容表 */
export function selectPlayDescInfo(data) {
  return request({
    url: `/api/playDescInfo/selectPlayDescInfo?page=1&size=-1`,
    method: 'post',
    data
  })
}
/** 修改剧本内容表 */
export function updatePlayDescInfo(data) {
  return request({
    url: `/api/playDescInfo/updPlayDescInfo`,
    method: 'post',
    data
  })
}
/** 查询作品角色、风格信息 */
export function queryPlayDetailsInfo(data) {
  return request({
    url: `/api/playDescInfo/selectScale`,
    method: 'post',
    params: data
  })
}
/** 删除剧本内容表 */
export function delPlayDescInfo(id) {
  return request({
    url: `/api/playDescInfo/delPlayDescInfo`,
    method: 'post',
    params: { id }
  })
}
/** 彻底删除剧本内容表 */
export function delRealPlayDescInfo(ids) {
  return request({
    url: `/api/playDescInfo/delRealPlayDescInfo`,
    method: 'post',
    data: { ids }
  })
}
/** 提取角色 */
export function getPlayRole(data) {
  return request({
    url: `/api/playDescInfo/getPlayRole`,
    method: 'post',
    data
  })
}
/** 查询剧本镜头 */
export function queryPlayShot(data) {
  return request({
    url: `/api/playDescInfo/queryPlayShot`,
    method: 'get',
    params: data
  })
}
/** 生成剧本分镜 */
export function createPlayShot(data) {
  return request({
    url: `/api/text/createPlayShot`,
    method: 'get',
    params: data
  })
}
/** 批量生成剧本镜头 */
export function createPlayShotBeach(data) {
  return request({
    url: `/api/text/createPlayShotBeach`,
    method: 'get',
    params: data
  })
}
/** 合并分镜镜头 */
export function combineLens(data) {
  return request({
    url: `/api/lens/mergeLens`,
    method: 'post',
    data
  })
}
/** 保存分镜镜头 */
export function saveLens(data) {
  return request({
    url: `/api/lens/saveLens`,
    method: 'post',
    data
  })
}
/** 复制分镜镜头 */
export function copyLens(data) {
  return request({
    url: `/api/lens/copyLens`,
    method: 'post',
    data
  })
}
/** 删除分镜镜头 */
export function delLens(id) {
  return request({
    url: `/api/lens/delLens`,
    method: 'post',
    params: { id }
  })
}
/** 下载剧本下镜头图片 */
export function downloadLensFrame(data) {
  return request({
    url: `/api/playDescInfo/downloadZip`,
    responseType: 'blob',
    method: 'get',
    params: data
  })
}
